<%-- 
    Document   : comp_edprofile
    Created on : May 1, 2012, 4:59:03 PM
    Author     : project
--%>

<script>
    $(document).ready(function(){
        $("#editcompanyprofile").validationEngine();

    });
</script>

<%@page import="java.sql.*"%>
<%@page import="jobportal.Dbconn"%>
<%
            try {
                Connection con = Dbconn.getConn();
                Statement st = con.createStatement();
                String compid = "";
                String dest = "EditProfile";
                if (session.getAttribute("role") != null && session.getAttribute("role").toString().equalsIgnoreCase("admin")) {

                        dest = "../Company/EditProfile";
                        if (request.getParameter("compid") != null) {
                            compid = request.getParameter("compid");
                        }
                    }else  {
                    compid = (String)session.getAttribute("username");
                }
                ResultSet rs = st.executeQuery("select * from company where compid= '" + compid + "'");
                rs.next();
                out.print(dest);

%>

<div class="mainheading_emp" style="clear:both; margin-bottom:5px;">Manage Company Profile</div>
<br class="clear" />
<span class="messagesred" style="padding-left:5px; text-align:left">
</span>
<form name="editcompanyprofile"  id="editcompanyprofile" action="<%=dest%>">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tbody>


            <tr>
                <td align="center" class="messagesred">
                    <input type="hidden" name="compid" value="<%=compid%>">
                </td>
            </tr>
            <tr>
                <td align="center"><div align="right" style="padding-right:20px;"><span class="messagesred">*</span>Fields are mandatory</div></td>
            </tr>
        </tbody>
    </table>

    <img src="/images/blank.gif" width="1" height="15">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-left:20px;">
        <tbody>

            <tr>
                <td colspan="4"></td>
            </tr>
            <tr>
                <td colspan="4"></td>
            </tr>
            <tr>
                <td colspan="4"><strong>Login Information</strong><div class="line_spacer1"><!-- --></div></td>
            </tr>


            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span>  Email </p></td>
                <td  colspan="4" align="left" valign="middle"><input id="email" size="25" name="email" class="validate[required],custom[email]" value="<%=rs.getString("email")%>" >
                    &nbsp; <span id="check_email_div"></span></td>
            </tr>


            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Contact Name </p></td>
                <td colspan="4" align="left" valign="middle"><input id="personname" size="25" class="validate[required,minSize[10],maxSize[11]],custom[onlyLetterSp]" name="personname" value="<%=rs.getString("personname")%>"></td>
            </tr>
            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Designation </p></td>
                <td colspan="4" align="left" valign="middle"><input id="designation" class="validate[required],custom[onlyLetterSp]" size="25" name="designation" value="<%=rs.getString("designation")%>"></td>
            </tr>
            <tr>
                <td height="28" colspan="4" valign="top" style="padding-left:5px;"><strong>Contact Number</strong><div class="line_spacer1"><!-- --></div></td>
            </tr>
            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><span class="messagesred">*</span> Office</td>
                <td colspan="4" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tbody><tr>
                                <td><input id="contact" size="25" name="contact" class="validate[required,minSize[10],maxSize[11]],custom[phone]"value="<%=rs.getString("contact")%>"></td>
                            </tr>
                        </tbody></table></td>
            </tr>
            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:15px;"><p>Fax </p></td>
                <td colspan="4" align="left" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tbody><tr>
                                <td><input id="fax" size="25" name="fax" class="validate[required,minSize[10],maxSize[11]],custom[phone]"value="<%=rs.getString("fax")%>"></td>
                            </tr>
                        </tbody></table></td>
            </tr>
            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Mobile </p></td>
                <td colspan="4" align="left" valign="middle"><input id="mobile" size="25" name="mobile" class="validate[required,minSize[10],maxSize[10]],custom[phone]" value="<%=rs.getString("mobile")%>">
                    &nbsp; <span id="check_mobile_div"></span></td>
            </tr>
            <tr>
                <td colspan="4" valign="top">&nbsp;</td>
            </tr>
            <tr>
                <td height="28" colspan="3" style="padding-left:5px;"><strong>Company Information:</strong> <div class="line_spacer1"><!-- --></div></td>
            </tr>
            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Company Name</p></td>
                <td colspan="4" align="left" valign="middle"><input id="compname" class="validate[required],custom[onlyLetterSp]" size="25" name="compname" value="<%=rs.getString("compname")%>"></td>
            </tr>
            <tr>
                <td valign="top" colspan="2" style="padding-left:5px;"><p><span class="messagesred">*</span> Company Address</p></td>
                <td colspan="4" align="left" valign="middle"><textarea name="address" cols="40" rows="4" id="address" class="validate[required]" ><%=rs.getString("address")%></textarea></td>
            </tr>

            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><span class="messagesred">*</span> State</td>
                <td  align="left" valign="middle">
                    <div id="txtHint1">
                        <select name="state" id="state" class="validate[required],listmenu"style="width: 200px;" >
                            <option value="<%=rs.getString("state")%>" selected="selected"><%=rs.getString("state")%></option>
                        </select>
                    </div>
                </td>
            </tr>
            <tr>
                <td height="28" colspan="2" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> City </p></td>
                <td align="left" valign="middle">
                    <div id="txtHint12">
                        <select name="T8" id="city" class="validate[required],listmenu" style="width: 200px;" >
                            <option value="<%=rs.getString("city")%>"  selected="selected"> <%=rs.getString("city")%></option>
                        </select>
                    </div>

            </tr>
            <tr>
                <td width="194" height="28" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Company Type</p></td>
                <%if (rs.getString("type").equals("Placement Consultant")) {%> <td colspan="4" align="left" valign="middle">       <input id="companytype" class="validate[required],radio" type="radio" value="Placement Consultant" name="radiobutton"   checked="checked">
                    Placement Consultant        <input id="companytype" type="radio" value="Corporate" name="radiobutton"  class="radio">                                    Corporate        </td><%} else {%><td colspan="4" align="left" valign="middle">       <input id="companytype" type="radio" value="Placement Consultant" name="radiobutton"  class="radio" >
                    Placement Consultant        <input id="companytype" type="radio" value="Corporate" name="radiobutton"  class="radio" checked="checked">                                    Corporate        </td><%}%>
            </tr>
            <tr>
                <td height="28" valign="top" style="padding-left:5px;"><span><span class="messagesred">*</span> Company Category Type </span></td>
                <td colspan="4" align="left" valign="middle"><select name="indtype"  id="indtype" class="validate[required],listmenu"style="width: 230px">
                        <option value="">--Select--</option>
                        <option value="<%=rs.getString("cattype")%>" selected="selected"><%=rs.getString("cattype")%></option>
                        <option value="Accounting-Tax/Consulting">Accounting-Tax/Consulting</option>
                        <option value="Architecture Interior Design">Architecture Interior Design</option>
                        <option value="Automobiles">Automobiles</option>
                        <option value="Banking/Financial">Banking/Financial</option>
                        <option value="Biotech/Pharma">Biotech/Pharma</option>
                        <option value="BPO/KPO">BPO/KPO</option>
                        <option value="Bussiness management">Bussiness management</option>
                        <option value="Construction/Engineering">Construction/Engineering</option>
                        <option value="Entertainment/Media">Entertainment/Media</option>
                        <option value="Graphic / Web Design">Graphic / Web Design</option>
                        <option value="IT Hardware/Telecom">IT Hardware/Telecom</option>
                        <option value="IT/Software Services">IT/Software Services</option>
                        <option value="na">na</option>
                        <option value="Software Development &amp; Sales">Software Development &amp; Sales</option>
                        <option value="Supply Chain/Purchase">Supply Chain/Purchase</option>
                    </select></td>
            </tr>
            <tr>
                <td height="28" valign="top" style="padding-left:5px;"><p><span class="messagesred">*</span> Company Sector </p></td>
                <td colspan="4" align="left" valign="middle"><select name="compcat"  id="compcat" class="validate[required],listmenu" style="width: 230px">
                        <option value="<%=rs.getString("sector")%>" selected="selected"><%=rs.getString("sector")%></option>
                        <option value="Government Organization">Government Organization</option>
                        <option value="Government/Ministry">Government/Ministry</option>
                        <option value="Mulitnational Corporation">Multinational Corporation</option>
                        <option value="Non-Government Organization">Non-Government Organization</option>
                        <option value="Others">Others</option>
                        <option value="Private Limited">Private Limited</option>
                        <option value="Small &amp; Medium Enterprise">Small &amp; Medium Enterprise</option>
                        <option value="Sole Proprietor">Sole Proprietor</option>
                        <option value="Statutory Board">Statutory Board</option>
                        <option value="Utech">Utech</option>
                    </select>    </td>
            </tr>

            <tr>
                <td valign="top" style="padding-left:5px;"><p><span >*</span> Company Profile </p></td>
                <td colspan="4" align="left" valign="middle"><textarea id="profile" class="validate[required]" name="profile" cols=""="170" rows="10"><%=rs.getString("profile")%></textarea></td>
            </tr>


            <tr>
                <td height="34" valign="top" style="padding-left:5px;"><p>Website URL </p></td>
                <td colspan="4" align="left" valign="middle"><input name="url" id="url" class="validate[required],custom[url]"size="40" maxlength="100" value="<%=rs.getString("url")%>">
                    Example:http:// www.abc.com</td>
            </tr>



            <tr>
                <td colspan="4" align="left" valign="middle" height="76"> <div style="padding-left:320px; padding-top:10px; padding-bottom:10px;"><input name="Submit" type="submit" value="Update" class="button2"></div></td>
            </tr>
            <tr>
                <td colspan="4" align="center" valign="middle" height="10px">

                </td>
            </tr>
        </tbody></table>

    <tr>          <td align="center">&nbsp;</td>

</form>
<% } catch (Exception e) {
                out.println(e);
            }
%>
<%
            if (request.getAttribute("status") != null) {
%>
<div id="message"  title="Message">
    <%
                    out.println(request.getAttribute("status"));
    %>
</div>
<%
                request.removeAttribute("status");
            }
%>
